package com.hjduan.spring.cloud.request.controller;

import com.hjduan.spring.cloud.request.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by zhangheng on 2017/10/15.
 */
@RestController
@RequestMapping("/article")
public class ArticleController {

    @Autowired
    ArticleService articleService;

    @RequestMapping(value = "/getlist")
    public void getArticleList(String type){
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("status", type);
        Map<String, Object> res = articleService.getArticleList(params);
        System.out.println(res);
    }

    public void saveArticle(){

    }
}
